<?php

class SavingsProducts extends HTech_Db_Table
{
    protected $_name    = 'view_savings_products';
    protected $_primary = 'SavingsProductId';  
    
    protected function _setGridMetadata()
    {
        $this->_gridMetadata['title'] = $this->translate("Savings products");
        $this->_gridMetadata['onClick'] = 'savings.savings-product.view';
        $this->_gridMetadata['headers'] = array
            (
                array('SavingsProductId',     30, $this->translate("Id"),                      'Number'),
                array('Name',                300, $this->translate("Name"),                    'String'),
                array('MinRate',             100, $this->translate("Minimun rate"),            'Number',   'Standard'),
                array('MinBalance',          200, $this->translate("Balance for min. rate"),   'Number',   'Standard'),
                array('MaxRate',             100, $this->translate("Maximun rate"),            'Number',   'Standard'),
                array('MaxBalance',          200, $this->translate("Balance for max. rate"),   'Number',   'Standard')
            );
        return $this;
    }
       
    static function getSavingsProductOptions()
    {
        return array();
        /*
        return Zend_Registry::get('db')
         * ->fetchPairs("select SavingsProductId, Name from savings_products order by Name");
         * 
         */
    }
}